package net.yiny.scrummer.ui.storyboard

public class CardController {

    def builder
    def card

    def initialise() {
        if (!builder || !card) {
            throw new IllegalStateException('Controller not initialised with builder and card')
        }
        def panel = builder?.initialise()
        updateCard()
        panel
    }

    def updateCard() {
        builder.name = card.name
        builder.id = "#$card.id"
        builder.description = card.description
    }
}